package com.zhang.designmode.wangzheng_design_mode.prototype;

/**
 * @Author: zxz
 * @DateTime: 2022/3/7 14:40
 * @Description: TODO
 */
public class Client {
    public static void main(String[] args) {
        House house = new House();
        house.setAddress("beijing");
        Person person = new Person();
        person.setAge(11);
        person.setName("zhangsan");
        person.setHouse(house);

        Person clone = person.clone();
        System.out.println(clone == person);

        System.out.println(clone.getName() == person.getName());
        //比较person 里的的对象属性 clone后和原对象是否一直
        System.out.println(person.getHouse() == clone.getHouse());

    }
}
